import request from "@/util/request";


export function addRole(role){
    return request({
        url: '/role/add',
        method: 'post',
        data: role,
    })
}

export function deleteRoleById(id){
    return request({
        url: '/role/delete/' + id,
        method: 'delete'
    })
}

export function roleList(roleDesc, pageNum, pageSize){
    return request({
        url: '/role/page?pageNum=' + pageNum + '&pageSize=' + pageSize + '&roleDesc=' + roleDesc,
        method: 'get'
    })
}

export function roleAllList(){
    return request({
        url: '/role/list',
        method: 'get'
    })
}


export function updateRole(role){
    return request({
        url: '/role/update',
        method: 'post',
        data: role
    })
}